import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/prodList?sellerUserId=ff808081733c35e401733c3651af0000'
  },
  {
    path: '/prodList',
    name: 'prodList',
    component: () => import('@views/prodList/index')
  },
  {
    path: '/prodDetail',
    name: 'prodDetail',
    component: () => import('@views/prodDetail/index')
  },
  {
    path: '/prodBooking',
    name: 'prodBooking',
    component: () => import('@views/prodBooking')
  },
  // 橱窗开通
  {
    path: '/shopOpen',
    name: 'shopOpen',
    component: () => import('@views/shopOpen/index')
  },
  // 橱窗管理
  {
    path: '/shopManage',
    name: 'shopManage',
    component: () => import('@views/shopManage/index')
  },
  {
    path: '/prodAdd',
    name: 'prodAdd',
    component: () => import('@views/prodAdd/index')
  },
  {
    path: '/prodEdit',
    name: 'prodEdit',
    component: () => import('@views/prodEdit/index')
  },
  {
    path: '/prodClassify',
    name: 'prodClassify',
    component: () => import('@views/prodClassify/index')
  }
]

const router = createRouter({
  scrollBehavior: () => ({ y: 0 }),
  history: createWebHashHistory(),
  routes
})

export default router
